package com.ruibang.glass.quality.controller.data;

import com.ruibang.glass.quality.domain.req.ColdDirectReq;
import com.ruibang.glass.quality.service.EverydayColdDirectService;
import com.teaming.cloud.framework2.common.model.ResultBody;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;



@RestController
@RequestMapping("/api/clod/direct")
@Api(value="每天冷端直投缺陷全检平均单板数量及曲线",tags={"每天冷端直投缺陷全检平均单板数量及曲线"})
public class EverydayColdDirectController {

    @Autowired
    private EverydayColdDirectService everydayColdDirectService;

    @PostMapping("/queryColdDirect")
    @ApiOperation(value="查询每天冷端直投缺陷",notes="查询每天冷端直投缺陷")
    public ResultBody queryEverydayColdDirect(@RequestBody ColdDirectReq coldDirectReq){
        return everydayColdDirectService.queryEverydayColdDirect(coldDirectReq);
    }

    @PostMapping("/queryCheckAverage")
    @ApiOperation(value="全检平均单板数量及曲线",notes="全检平均单板数量及曲线")
    public ResultBody queryCheckAverage(@RequestBody ColdDirectReq coldDirectReq){
        return everydayColdDirectService.queryCheckAverage(coldDirectReq);
    }

    @PostMapping("/queryDefect")
    @ApiOperation(value="饼状图",notes="饼状图")
    public ResultBody queryDefect(@RequestBody ColdDirectReq coldDirectReq){
        return everydayColdDirectService.queryDefect(coldDirectReq);
    }

}
